package com.ycj.config;

import jakarta.annotation.PostConstruct;
import lombok.extern.java.Log;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;

@Log
@Configuration
//@ImportResource("classpath:properties-config.xml")
@PropertySource("classpath:jdbc.properties")
public class AppConfig {

    @Value("${jdbc.url}")
    private String url;

    @Value("${jdbc.username}")
    private String username;

    @Value("${jdbc.password}")
    private String password;

    @PostConstruct
    public void init() {
        log.info("url" + url);
        log.info("username" + username);
        log.info("password" + password);
    }
}

